const mongoose = require('mongoose')
const deptSchema = mongoose.Schema({
    deptName: String,                       //部门名称
    userId: String,                         //部门负责人ID  
    userName: String,                       //部门负责人姓名
    userEmail: String,                      //部门负责人邮箱
    parentId: [mongoose.Types.ObjectId],    //父级部门ID    
    updateTime: {                            //更新时间 
        type: Date,
        default: Date.now()
    },
    createTime: {                            //创建时间
        type: Date,
        default: Date.now()
    }
})
module.exports = mongoose.model("depts", deptSchema, "depts")